// Problem 131: Prime cube partnership
//
// There are some prime values, p, for which there exists a positive integer, n, such that the expression n3 + n2p is a perfect cube.
// For example, when p = 19, 83 + 82×19 = 123.
// What is perhaps most surprising is that for each prime with this property the value of n is unique, and there are only four such primes below one-hundred.
// How many primes below one million have this remarkable property?
package main

import (
	"fmt"
	"projecteuler/euler"
)

func p131() {
	ans := 0
	for t := 1; t < 578; t++ {
		p := 3*t*t + 3*t + 1
		if euler.IsPrime(p) {
			ans++
		}
	}
	fmt.Println("Problem 131:", ans)
}
